using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
// using Spine.Unity;
using UnityEngine.UIElements;
using UnityEditor.SceneManagement;
using UnityEngine.SceneManagement;

namespace YF.Art
{
    // [CustomEditor(typeof(YFCustomLightDir)), CanEditMultipleObjects]
    // public class YFCustomLightDirInspector : Editor {
    //     private bool needsReset;

    //     [MenuItem("GameObject/CustomLight", false, -1)]
    //     public static void CreateMovableLightMenuItem(MenuCommand menuCommand)
    //     {
    //         GameObject lightLayer = GameObject.Find("_CustomLightDir");
    //         if (null == lightLayer)
    //         {
    //             lightLayer = new GameObject("_CustomLightDir");
    //             lightLayer.AddComponent<YFCustomLightDir>();
    //         }
    //         Selection.activeObject = lightLayer;
    //     }

    //     private YFCustomLightDir customLight;

    //     void OnEnable()
    //     {
    //     }

    //     void OnDisable()
    //     {
    //     }

    //     override public void OnInspectorGUI () 
    //     {
    //         customLight = target as YFCustomLightDir;

    //         if (needsReset) {
    //             needsReset = false;
    //             Vector3 lightDir = customLight.lightDir;
    //             float lightNess = customLight.lightNess;
    //             float rate = 0.01f;
    //             Shader.SetGlobalVector("_CustomLightDir", new Vector4(lightDir.x * rate, lightDir.y * rate, lightDir.z * rate, lightNess));
    //         }

    //         EditorGUI.BeginChangeCheck();
    //         DrawDefaultInspector();
    //         needsReset |= EditorGUI.EndChangeCheck();
    //     }
    // }
}